package head.first.model.factory.demo1;


import java.util.ArrayList;

/**
 * Created by yiyongyao on 2018/2/28.
 *  产品类
 *
 */
public abstract class Pizza {

    String name;
    String dough; //面团
    String sauce; //酱汁
    ArrayList toppings = new ArrayList();

    void prepare()
    {
        System.out.println("准备 "+name);
        System.out.println("把面团");
        System.out.println("加入酱汁");
        for(int i=0;i<toppings.size();i++)
        {
            System.out.println(" "+toppings.get(i));
        }
    }

    void bake()
    {
        System.out.println("烤25分钟");
    }

    void cut()
    {
        System.out.println("分割批萨");
    }

    void box()
    {
        System.out.println("包装批萨");
    }

    public String getName() {
        return name;
    }
}
